package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collection;

public class BibliotecaApp {



    public static void main(String[] args) {
        BibliotecaApp bibliotecaApp = new BibliotecaApp();

        bibliotecaApp.greet(System.out);

        Collection<Book> currentBooks = new ArrayList<Book>();
        currentBooks.add(new Book("Our first book"));
        currentBooks.add(new Book("Our last book"));


        Library ourLibrary = new Library(currentBooks);

        bibliotecaApp.printBooks(System.out, ourLibrary);

        bibliotecaApp.displayMenu(System.out);

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        try {
            String option = bibliotecaApp.getInput(bufferedReader);
        } catch (IOException e) {
            e.printStackTrace();
        }



    }

    public void greet(PrintStream printStream) {
        printStream.println("Welcome to Biblioteca");
    }

    public void printBooks(PrintStream printStream, Library library) {
        String booksString = library.getBooks();
        printStream.println(booksString);
    }

    public void displayMenu(PrintStream printStream) {
        String options = "Menu Options:\nList Books\nOption 2\n";
        printStream.println(options);

    }

    public String getInput(BufferedReader bufferedReader) throws IOException {
        String optionSelected = bufferedReader.readLine();
        return optionSelected;
    }

}
